<?php


namespace app\miniapp\controller;


use app\common\controller\Api;
use app\miniapp\model\NoticeModel;

class Notice extends Base
{
    protected $noNeedLogin = '*';

    //公告列表
    public function list()
    {
        $data = NoticeModel::order('id','DESC')
            ->field('id,notice')
            ->select();
        if (!$data) {
            $this->error('错误');
        }
        $this->success('查询成功',[
            'list' => $data
        ]);
    }

}